package com.fz.us.admin.base.bean.search.result;

import com.fz.us.admin.base.bean.search.Search;

/**
 * 查询 - 结果 - SearchResult
 * ============================================================================
 * 版权所有 2016 。
 *
 * @author fallenpanda
 * @version 1.0 2016-07-13 。
 * ============================================================================
 */
public abstract class SearchResult {

    protected final Search search;

    protected SearchResult(Search search) {
        this.search = search;
    }

    public abstract static class Builder<T extends SearchResult, B extends Builder<T, B>> {

        private B theBuilder;

        protected Search search;

        protected Builder () {
            theBuilder = getThis();
        }

        protected abstract B getThis();

        public B setSearch(Search search) {
            this.search = search;
            return theBuilder;
        }

        public abstract T build();

    }

}
